# Package script for the Pysoar package

# IRAF patch level V2.14.1a or greater is required.
if (defpar ("release")) {
    if (release <= "2.14") {
        printf ("WARNING: IRAF patch level V2.14.1 or greater is required\n")
        printf ("         to run the SOAR IRAF package\n")
        sleep 1
    }
} else {
    printf ("WARNING: IRAF patch level V2.14.1 or greater is required\n")
    printf ("         to run the SOAR IRAF package\n")
    sleep 1
}
;

# Load necessary packages - only those that are used by all packages

# Set the imtype to fits
reset imtype = "fits"
flpr

# Set up tasks which report on PyRAF-based tasks
task pyexecute = "pysoar$pyexecute.cl"
hidetask pyexecute 

# This task simply prints a message stating that a task needs PyRAF to run
task nopyraf = "pysoar$nopyraf.cl"
hidetask nopyraf

# Add python tree to default Python path, if running PyRAF
pyexecute("pysoar$addpath.py",verbose=yes)

#define the different tasks


set soartools     = "pysoar$soartools/"
task soartools.pkg    = soartools$soartools.cl

set soi   = "pysoar$soi/"
task soi.pkg    = soi$soi.cl

package pysoar

task $sed = $foreign
hidetask sed

print(" ")
print(" ")
print("     +--Southern Astrophysical Research Telescope IRAF Package-+")
print("     +---------------------------------------------------------+")
print("     |             Beta Version 0.1 , Sep 30, 2009             |")
print("     |                 Requires IRAF 2.14                      |")
print("     |                 PyRAF 1.9                               |")
print("     |             Bug reports: lfraga@ctio.noao.edu           |")
print("     +---------------------------------------------------------+")
print(" ")
print("     Setting imtype=fits")
print(" ")
print(" ")

;
clbye()
